cmake_minimum_required(VERSION 3.16)
project(SnakeGame)

set(CMAKE_C_STANDARD 11)

# 查找 raylib
find_package(raylib REQUIRED)

# 添加可执行文件
add_executable(SnakeGame
        main.c
        snakeGame.c
        snakeGame.h
)

# 链接 raylib 1
target_link_libraries(SnakeGame raylib)

# macOS 特定设置
if(APPLE)
    target_link_libraries(SnakeGame
            "-framework IOKit"
            "-framework Cocoa"
            "-framework OpenGL"
    )
endif()